/**
 * This file is part of Cube.
 * 
 * The MIT License (MIT)
 *
 * Copyright (c) 2020 Shixin Cube Team.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

.hidden {
    display: none;
}

.highlight {
    background-color: #eee;
    font-size: 1.2em;
    margin: 0 0 30px 0;
    padding: 0.2em 1.5em;
}

.warning {
    color: red;
    font-weight: 400;
}

@media screen and (min-width: 1000px) {

    /* hack! to detect non-touch devices */
    div#links a {
        line-height: 0.8em;
    }
}

audio {
    max-width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 1em;
    word-break: break-word;
    font-size: 14px;
}

table {
    padding: unset;
    margin: unset;
}

table tr td {
    padding: 4px 8px 4px 8px;
}

input {
    font-size: 14px;
}

button {
    /*background-color: #d84a38;*/
    background-color: #0074e8;
    border: none;
    border-radius: 2px;
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    margin: 0 0 1em 0;
    padding: 0.5em 0.7em 0.6em 0.7em;
}

button:active {
    /*background-color: #cf402f;*/
    background-color: #489bee;
}

button:hover {
    /*background-color: #cf402f;*/
    background-color: #489bee;
}

button[disabled] {
    color: #ccc;
}

button[disabled]:hover {
    /*background-color: #d84a38;*/
    background-color: #489bee;
}

canvas {
    background-color: #ccc;
    max-width: 100%;
    width: 100%;
}

code {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

div#container {
    margin: 0 auto 0 auto;
    max-width: 60em;
    padding: 1em 1.5em 1.3em 1.5em;
}

div#links {
    padding: 0.5em 0 0 0;
}

h1 {
    border-bottom: 1px solid #ccc;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    margin: 0 0 0.8em 0;
    padding: 0 0 0.2em 0;
}

h2 {
    color: #444;
    font-weight: 500;
}

h3 {
    /* border-top: 1px solid #eee; */
    color: #333;
    font-weight: 500;
    margin: 10px 0 10px 0;
    white-space: nowrap;
}

li {
    margin: 0 0 0.4em 0;
}

img {
    border: none;
    max-width: 100%;
}

input {
    font-size: 14px;
}

input[type=radio] {
    position: relative;
    top: -1px;
}

p {
    color: #444;
    font-weight: 300;
}

p#data {
    border-top: 1px dotted #666;
    font-family: "Courier New", monospace;
    line-height: 1.3em;
    max-height: 1000px;
    overflow-y: auto;
    padding: 1em 0 0 0;
}

p.borderBelow {
    border-bottom: 1px solid #aaa;
    padding: 0 0 20px 0;
}

section p:last-of-type {
    margin: 0;
}

section {
    border-bottom: 1px solid #eee;
    margin: 0 0 24px 0;
    padding: 0 0 18px 0;
}

section:last-of-type {
    border-bottom: none;
    padding: 0 0 1em 0;
}

select {
    position: relative;
    font-size: 12px;
    padding: 0.2em 0.1em 0.4em 0;
    /*
    top: -1px;
    margin: 0 1em 1em 0;
    */
}

h1 span {
    white-space: nowrap;
}

a {
    color: #6fa8dc;
    font-weight: 300;
    text-decoration: none;
}

h1 a {
    font-weight: 300;
    margin: 0 10px 0 0;
    white-space: nowrap;
}

a:hover {
    color: #3d85c6;
    text-decoration: underline;
}

a#viewSource {
    display: block;
    margin: 1.3em 0 0 0;
    border-top: 1px solid #999;
    padding: 1em 0 0 0;
}

div#errorMsg p {
    color: #F00;
}

div#links a {
    display: block;
    line-height: 1.3em;
    margin: 0 0 1.5em 0;
}

div.outputSelector {
    margin: -1.3em 0 2em 0;
}

p.description {
    margin: 0 0 0.5em 0;
}

strong {
    font-weight: 500;
}

textarea {
    resize: none;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}

video {
    background: #222;
    margin: 0 0 20px 0;
    --width: 100%;
    width: var(--width);
    height: calc(var(--width) * 0.75);
}

ul {
    margin: 0 0 0.5em 0;
}

.dialog {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: rgba(24, 24, 24, 0.7);
    visibility: hidden;
}
.dialog-content {
    position: absolute;
    float: left;
    left: calc(50vw - 200px);
    top: 100px;
    width: 400px;
    border-radius: 8px;
    background-color: #fefefe;
    box-shadow: 0 0 1px rgba(0,0,0,.125),0 1px 3px rgba(0,0,0,.2);
}
.dialog-header {
    border-bottom: 1px solid #aaa;
    padding-left: 10px;
}
.dialog-body {
    margin: 8px 10px 8px 10px;
}
.dialog-footer {
    border-top: 1px solid #aaa;
    padding: 10px 10px 8px 0;
    text-align: right;
}
.dialog-footer button {
    display: inline-block;
    margin-bottom: 0px;
    margin-left: 10px;
}

.stats-box {
    position: absolute;
    float: left;
    top: 0;
    left: 0;
    padding: 8px;
    background-color: lightslategray;
    color: snow;
    opacity: 0.8;
    visibility: hidden;
}
.stats-box:hover {
    opacity: 1.0;
}
.stats-box h3 {
    color: snow;
    font-weight: bold;
    margin: 20px 0px 10px 0px;
}
.stats-box .stat-name {
    display: inline-block;
    font-weight: bold;
    min-width: 114px;
    text-align: right;
}

@media screen and (max-width: 650px) {
    .highlight {
        font-size: 1em;
        margin: 0 0 20px 0;
        padding: 0.2em 1em;
    }

    h1 {
        font-size: 24px;
    }
}

@media screen and (max-width: 550px) {
    button:active {
        background-color: darkRed;
    }

    h1 {
        font-size: 22px;
    }
}

@media screen and (max-width: 450px) {
    h1 {
        font-size: 20px;
    }
}
